package ch3;

public class STest {

	public static void main(String[] args) {
		Sex s = Sex.男;
		String n = s.name();
		System.out.println(n);
		int weizhi = s.ordinal();
		System.out.println(weizhi);

		Student s1 = new Student("孙悟空", Sex.妖);
		System.out.println(s1);
		String inputName = "张果老";
		String inputSex = "女";

		Student s2 = new Student(inputName, Sex.valueOf(inputSex));
		System.out.println(s2);
	}

}
